﻿<UserControl x:Class="daigou.modules.Configuration.ConfigurationView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <DockPanel>
            <StackPanel DockPanel.Dock="Top" Orientation="Horizontal">
                <Button Content="Save" Margin="10" Command="{Binding SaveCommand}" Height="50" Width="180" Background="Orange"></Button>
            </StackPanel>
            
            <Rectangle Height="2" Fill="Gray" DockPanel.Dock="Top" Margin="0 0 0 10"/>
            
        <ListView  ItemTemplate="{StaticResource  ConfigurationListTemplate}" 
                   ItemsSource="{Binding ConfigurationList}"
                   HorizontalAlignment="Stretch"
                   Name="listView1"
                   VerticalAlignment="Stretch"  BorderThickness="0" BorderBrush="{x:Null}" IsHitTestVisible="True" IsManipulationEnabled="False">
                <ListView.Resources>
                    <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Green"/>
                </ListView.Resources>
                    <ListView.View>
                    <GridView >
                        <GridViewColumn Header="Key" Width="200">
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <Label Content="{Binding Key}"></Label>
                                        
                                    
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                        
                        <GridViewColumn Header="Value" Width="400">
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <TextBox IsHitTestVisible="True" Text="{Binding Value,UpdateSourceTrigger=PropertyChanged}"></TextBox>


                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                    </GridView>
                </ListView.View>
            </ListView>
        </DockPanel>
    </Grid>
</UserControl>
